//
//  ChatPrescriptionRowCell.swift
//  EyeVisionForDoctors
//
//  Created by PMC on 2020/3/1.
//  Copyright © 2020 tao Tao. All rights reserved.
//

import UIKit

class ChatPrescriptionRowCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .clear
        contentView.backgroundColor = .clear
    }
    
    @IBOutlet private weak var nameLabel: UILabel!
    
    @IBOutlet private weak var measureLabel: UILabel!
    
    @IBOutlet private weak var numTimesLabel: UILabel!
    
    @IBOutlet private weak var numDaysLabel: UILabel!
    
    @IBOutlet private weak var takeLabel: UILabel!
    
    @IBOutlet weak var countLabel: UILabel!
    
    @IBOutlet private weak var costLabel: UILabel!
    
    func configure(with vm: DrugsRowViewModel) {
        nameLabel.text = vm.name
        measureLabel.text = vm.drugSpecification
        numTimesLabel.text = vm.drugDose + "\(vm.dosageUnit)/次"
        numDaysLabel.text = vm.drugFrequency
        takeLabel.text = vm.drugChannel
        countLabel.text = vm.drugNumber
        costLabel.text = "￥\(vm.expense)"
    }
    
}
